package com.atguigu.day03.homework;

import java.util.Scanner;

public class HomeWork16 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你生日的月份:");
        int month = sc.nextInt();
        System.out.println("请输入你生日的日期:");
        int day = sc.nextInt();

        if (month >0 && month <= 12) {
            if(month == 2){
                if(day <= 29){}else {
                    System.out.println("2月没有这一天哦");
                    return;
                }
            }
            if(day > 0 && day <= 31) {
                if(month == 3 && day >=21 || month == 4 && day <= 19) {
                    System.out.println("朋友,你是白羊座的哦");
                }else if(month == 4 && day >=20 || month == 5 && day <= 20) {
                    System.out.println("朋友,你是金牛座的哦");
                }else if(month == 5 && day >=21 || month == 6 && day <= 21){
                    System.out.println("朋友,你是双子座的哦");
                }else if(month == 6 && day >=22 || month == 7 && day <= 22){
                    System.out.println("朋友,你是巨蟹座的哦");
                }else if(month == 7 && day >=23 || month == 8 && day <= 22){
                    System.out.println("朋友,你是狮子座的哦");
                }else if(month == 8 && day >=23 || month == 9 && day <= 22){
                    System.out.println("朋友,你是处女座的哦");
                }else if(month == 9 && day >=23 || month == 10 && day <= 23){
                    System.out.println("朋友,你是天秤座的哦");
                }else if(month == 10 && day >=24 || month == 11 && day <= 22){
                    System.out.println("朋友,你是天蝎座的哦");
                }else if(month == 11 && day >=23 || month == 12 && day <= 21){
                    System.out.println("朋友,你是射手座的哦");
                }else if(month == 12 && day >=22 || month == 1 && day <= 19){
                    System.out.println("朋友,你是摩羯座的哦");
                }else if(month == 1 && day >=20 || month == 2 && day <= 18){
                    System.out.println("朋友,你是水瓶座的哦");
                }else if(month == 2 && day >=19 || month == 3 && day <= 20){
                    System.out.println("朋友,你是双鱼座的哦");
                }
            }else{
                System.out.println("日期格式出现错误,再试一下吧");
            }
        }else{
            System.out.println("月份格式出错了,再试一下吧");
            return;
        }
    }
}
